package com.ms.demo.demo2;

/**
 * @description: 创建具体访问者A
 * @author: ms
 * @create: 2022-10-28 10:29
 */
public class ConcreteVisitorA implements IVisitor{

    public void visit(ConcreteElementA element) {
        String result = element.get();
        System.out.println("具体访问者ConcreteVisitorA,访问结果： " + result);
    }

    public void visit(ConcreteElementB element) {
        String result = element.get();
        System.out.println("具体访问者ConcreteVisitorA,访问结果： " + result);
    }

}